package String_demo;

public class StringDemo01 {
    public static void main(String[] args) {
        /**
         * 字符串是类型，可以使用new String()创建对象
         * 创建的对象和双引号创建的一样.
         *
         */

        String s1 = "六花";
        String s3 = "六花";
        char[] chs = {'六','花'};
        String s2 = new String(chs);
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s1==s2);
        System.out.println(s1.equals(s2));
        System.out.println(s1.length());

        System.out.println(s1==s3);
        System.out.println(s1.equals(s3));
    }
}
